package com.oracle.oa.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity                        
@Table(name="userstate")
public class Userstate  implements java.io.Serializable {


	 @GenericGenerator(name = "generator", strategy = "increment")
	 @Id
	 @GeneratedValue(generator = "generator")
	 @Column(name = "userstateid", unique = true, nullable = false)    
     private int userstateid;
	 
	 @Column(name = "userstatename", length = 64)
     private String userstatename;
	 
	 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "category")
     private Set userinfos = new HashSet(0);
	
	 public int getUserstateid() {
		return userstateid;
	}
	public void setUserstateid(int userstateid) {
		this.userstateid = userstateid;
	}
	public String getUserstatename() {
		return userstatename;
	}
	public void setUserstatename(String userstatename) {
		this.userstatename = userstatename;
	}
	public Set getUserinfos() {
		return userinfos;
	}
	public void setUserinfos(Set userinfos) {
		this.userinfos = userinfos;
	}
	public Userstate(int userstateid, String userstatename, Set userinfos) {
		this.userstateid = userstateid;
		this.userstatename = userstatename;
		this.userinfos = userinfos;
	}
	public Userstate() {
		super();
	}
	@Override
	public String toString() {
		return "Userstate [userstateid=" + userstateid + ", userstatename="
				+ userstatename + ", userinfos=" + userinfos + "]";
	}




}